package com.wkbb.common.enums;

/**
 * @author luowenyan
 * 动态类型 1：动态  2：宝宝考勤  3：温馨提示 4: 广告
 */
public enum DynamicTypeEnum {

    /**
     * 动态
     */
    DYNAMIC(1,"动态"),
    /**
     * 考勤
     */
    ATTEND(2,"考勤"),
    /**
     * 温馨提示
     */
    REMINDER(3,"温馨提示"),
    /**
     * 广告
     */
    ADVERTISEMENT(4,"广告"),
    /**
     * 宝贝食谱
     */
    RECIPE(5,"宝贝食谱");

    private DynamicTypeEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private Integer value;

    private String desc;

    public Integer getValue() {
        return this.value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDesc(Integer value) {
        for (DynamicTypeEnum dynamicType : DynamicTypeEnum.values()) {
            if (dynamicType.getValue().intValue()==value) {
                return dynamicType.getDesc();
            }
        }
        return null;
    }
}
